package simple.utils.data.serializers;


import java.io.IOException;

/**
 * Created by rehak on 4/25/14.
 */
public class StringSerializer implements Serializer<String> {
    @Override
    public byte[] toBytes(String s) throws IOException {
        return s.getBytes("UTF-8");
    }

    @Override
    public String fromBytes(byte[] data) throws IOException {
        return new String(data, "UTF-8");
    }
}
